home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / mui_add-ons / mcc_mathstring / mcc_mathstring.readme < prev    next >
Encoding:
Text File  |  1996-09-01  |  2.5 KB  |  78 lines

  1. Short:    The string gadget with a PhD in Mathematics, MUI Custom Class
  2. Author:   Vincenzo Gervasi (gervasi@di.unipi.it)
  3. Uploader: Vincenzo Gervasi (gervasi@di.unipi.it)
  4. Type:     dev/mui
  5.  
  6. MathString is a subclass of the String class that adds mathematical
  7. abilities to its superclass.
  8.  
  9. A MathString object can accept complex floating-point expressions,
  10. including algebraic operators, functions, measuring units, and
  11. return to the application only the value of the expression, giving
  12. the user the freedom to express a value as (S)HE feels it's easier,
  13. without burdening the application. For most things, handling
  14. a MathString object is as easy as a traditional String object via
  15. the MUIA_String_Integer tag.
  16.  
  17. The language accepted by a MathString object is as follows:
  18.  
  19. id     ::= 1-to-4-character (like IFF's IDs)
  20. num     ::= signed floating point, simple or exponential notation
  21. mnum    ::= num
  22.       | num id              /* id is measuring unit */
  23. mexp    ::= mnum
  24.       | mexp*mnum
  25.       | mexp/mnum
  26.       | (aexp)
  27.       | id(aexp)            /* id is function name  */
  28.       | id                  /* id is a constant     */
  29. aexp    ::= mexp
  30.       | aexp+mexp
  31.       | aexp-mexp
  32.  
  33. Spaces are not significant, except between digits, in an id, or
  34. between an id and a "(".
  35.  
  36. Some example:
  37.  
  38.     3.4 m / (1e10+3Km)
  39.     2*sin(30°)
  40.     1 in - 12 pt
  41.     cos(pi)/(1/3)
  42.  
  43. MathString supports custom measuring units, custom functions,
  44. custom constants, single- or double-precision IEEE and FFP modes,
  45. automatic error    handling, several built-in measuring systems
  46. and more.
  47.  
  48.  
  49. DISTRIBUTION
  50.  
  51. MathString is (C) 1996 V. Gervasi, but freely distributable as long
  52. as the following conditions are met:
  53.  
  54. 1. If you use MathString in a commercial or shareware product, you
  55.    have to send me a full (registered) package (copy) of the product,
  56.    including any update that still uses MathString.mcc.
  57.    Also, the text "MathString (C) 1996 V. Gervasi" should go in your
  58.    printed documentation, if any.
  59.  
  60. 2. If you use MathString in a PD product, you only have to put the text
  61.    "MathString (C) 1996 V. Gervasi" in your "About" window OR in the same
  62.    place where the "MUI (C) Stefan Stuntz" text is OR in the documentation.
  63.  
  64. In any case, I would appreciate an e-mail announcing the product.
  65. Provided that the above mentioned conditions are met, you can distribute
  66. MathString with your product, having care not to overwrite any later
  67. MathString.mcc the user could have already installed.
  68.  
  69.  
  70. AUTHOR
  71.  
  72. Vincenzo Gervasi            gervasi@di.unipi.it
  73. Dipartimento di Informatica
  74. Corso Italia, 40
  75. I-56125 PISA
  76. Italy
  77.  
  78.